# $Id: PKGBUILD 171289 2012-11-16 23:57:52Z allan $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
# Contributor: tobias <tobias@archlinux.org>

pkgname=ftgl
_pkgver=2.1.3-rc5
pkgver=${_pkgver/-/}
pkgrel=5
pkgdesc="OpenGL library to use arbitrary fonts"
arch=(i686 x86_64)
url="http://ftgl.wiki.sourceforge.net/"
license=('MIT')
depends=('freetype2' 'glu')
makedepends=('doxygen' 'mesa')
options=('!libtool')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$_pkgver.tar.bz2")
md5sums=('c7879018cde844059495b3029b0b6503')

build() {
  cd "$srcdir/$pkgname-${_pkgver/-/~}"
  sed -i '/^SUBDIRS =/s/demo//' Makefile.in
  ./configure --prefix=/usr --with-pic --disable-static
  make
}

package() {
  cd "$srcdir/$pkgname-${_pkgver/-/~}"
  make DESTDIR="$pkgdir" install

  # FS#23283: install missing headers for OpenCascade
  install -m644 src/FT{Face,Library,Size}.h "$pkgdir/usr/include/FTGL/"

  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
